
<template>
<div>
 <el-table
      :data="tableData"
      style="width: 100%">
  
      <el-table-column
        prop="username"
        label="姓名"
        width="180">
      </el-table-column>
      <el-table-column
        prop="password"
        label="地址">
      </el-table-column>
    </el-table>
    <button @click="test">发送请求@</button>
    <button @click="ts">输送请求</button>
    <button @click="ts1">输送请求1</button>
    <button @click="ts2">输送请求2</button>
    
</div>
   
   
  </template>

  <script>

    export default {
      data() {
        return {
          tableData:[{}]

        }
      },
      methods:{
            test(){
                    console.log("准备@发送请求")
                    this.$http.get('http://localhost:8088/getAllUser').then(res=>{
                        console.log(res.data)
                    })
                },
            ts(){
                this.$http.get('http://localhost:8088/getAllUser').then(res=>{
                        console.log(res.data.data)
                        this.tableData=res.data.data
                })
            },
            ts1(){
                this.$http.get('http://localhost:8088/getAllUser').then(res=>{
                   
                    if(res.data.status){
                             console.log(res.data.status)
                             this.$router.push('about')
                    }else{
                        console.log("fail")
                    }
                })
            },
            ts2(){
                this.$http.get('http://localhost:8088/getAllUser').then(res=>{
                    if(res.data.status){
                        console.log(res.data.status)
                        this.$router.push('about')
                    }else{
                        close.log("fail")
                    }
                })
            }
      }
         
        
      
    }
  </script>